package com.liudy.job;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @Author liudy
 */
@Component
@EnableScheduling
public class ScheduledController {

    private Logger LOGGER = LoggerFactory.getLogger(ScheduledController.class);

    @Scheduled(cron = "0/10 * * * * ?")
    public void pushDataScheduled() {

        LOGGER.info("start push data scheduled!");
        LOGGER.info("当前时间：{}", System.currentTimeMillis());
        LOGGER.info("end push data scheduled!");

    }
}